package com.git_taoxian.test2;

import java.util.ArrayList;

public class Test2 {
    public static void main(String[] args) {
        ArrayList<Integer> integerArrayList = new ArrayList<>();
        long begin = System.currentTimeMillis();
        for (int i = 1; i <= 10000000; i++) {
            integerArrayList.add(i);
        }
        long end = System.currentTimeMillis();
        long rs = end - begin;
        System.out.println("向集合中添加一千万个数字需要的时间是："+rs);
    }
}
